<template>
	<div>
		<div class="note" :style ="note">
			<div class="inform">
				<span>组织建设</span>
			</div>
		</div>
		<div class="list">
			<div class="bar" v-for="(item,index) in types" :key="index" @click="selfBuildingList(item)">
				<img class="dou" src="@as/img/zuzhi_wode_dha@2x.png" alt="">
				<div class="boxt">
					<div class="tit">
						<span>
							{{item.name}}
						</span>
					</div>
					<div class="go">
						<img src="@as/img/zuzhi_wode_xq@2x.png" alt="">
					</div>
				</div>
			</div>
		</div>
	</div>
</template>

<script>
	export default {
			data() {
				return {
					types:[],
					note: {
						backgroundImage: "url(" + require("@as/img/zuzhi_wode_js@2x.png") + ")",
						backgroundRepeat: "no-repeat",
						backgroundSize: "100%",
					},
				}
			},
			mounted() {

			},
			methods: {
				// 自身建设（列表）
				selfBuildingList:function(item){
					this.$router.push({ path: '../organization/selfBuildingList' , query: item })
				},
				async getType () {  
					let that = this;
					try {
						let params = {
							uid: JSON.parse(Cookies.get('user_71ydj')).id,
							org_id:JSON.parse(Cookies.get('user_71ydj')).organization_id,
						}
                        // /app/Construction/class_index?
						const url = `/app/Construction/class_index`
						let res = await that.$http.get(url, params) 
						that.$progress.done()
						if (res.code === 200) {
							that.types = res.data
						}
					} catch (e) {
						console.log('​catch -> e', e)
					}
				}
			},
			created(){
				this.getType()
			}
	}
</script>

<style scoped lang="scss">
  .note{
		padding: 38px 15px 15px 15px;
		box-sizing: border-box;
		width:100%;
		height:156px;
		position: relative;
	}
	.inform{
		width:100%;
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-top: 25px;
		span{
			font-size: 28px;
			color:#000;
			font-weight: bold;
		}
	}
	.list{
		width:100%;
		padding: 15px 15px;
		display: flex;
		justify-content: space-between;
		flex-wrap: wrap;
		position: absolute;
		left:0;
		top:125px;
		.bar{
			width:49%;
			height:142px;
			border-radius: 8px; 
			box-shadow: 0px 6px 15px 2px #f1f1f1;
			position: relative;
			margin-bottom: 10px;
			.dou{
				width:61px;
				height:44.5px;
				position: absolute;
				left:14px;
				top:0;
				z-index: 19;
			}
			.boxt{
				width:100%;
				height:100%;
				position: absolute;
				padding: 15px 24px;
				box-sizing: border-box;
				display: flex;
				flex-direction: column;
				justify-content: space-between;
				left:0;
				top:0;
				z-index: 20;
				.tit{
					width:100%;
					span{
						color:#333;
						font-size: 16px;
						font-weight: 600;
						display: inline-block;
						line-height: 1.6;
						margin-top: 7px;
					}
				}
				.go{
					width:100%;
					display:flex;
					justify-content: flex-end;
					img{
						width:28px;
						height:28px;
					}
				}
			}
		}
	}
</style>